package com.qtjf.qtmoneyservice.widget;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.qtjf.qtmoneyservice.R;
import com.qtjf.qtmoneyservice.activity.RelateActivity;
import com.qtjf.qtmoneyservice.constantSet.Constant;

import java.util.List;

/**
 * Created by Administrator on 2016/12/6 0006.
 */

public class ShenFenDialog extends Dialog {

    Context context;


    TextView okBt;
    ImageView cancelBt;

    Handler handler;

    RelativeLayout layout;

   // EditText editText;

   /* public SendMessageDialog(Context context){
        super(context);
        this.context = context;
    }*/

    public ShenFenDialog(Context context, int themeResId, Handler handler) {
        super(context, themeResId);
        this.context = context;
        this.handler = handler;
    }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setContentView(R.layout.shenfen_layout);


        okBt = (TextView) findViewById(R.id.submit_bt);
        cancelBt = (ImageView) findViewById(R.id.cancel_bt);
        //editText= (EditText) findViewById(R.id.edit_text);
        layout= (RelativeLayout) findViewById(R.id.layout);

        RelativeLayout.LayoutParams params= (RelativeLayout.LayoutParams) layout.getLayoutParams();
        params.height= (int)((Constant.getSCREENWIDTH()-40*Constant.getSCALE())*(416.0/335.0));
        layout.setLayoutParams(params);



        okBt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {


                ShenFenDialog.this.dismiss();
            }
        });

        cancelBt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                ShenFenDialog.this.dismiss();
            }
        });
    }


    public void closeDialog() {
        this.dismiss();
    }

}
